<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>usr_09 - Vim Documentation</title>
<meta name="Generator" content="Vim/8.0">
<meta name="plugin-version" content="vim8.0">
<meta name="syntax" content="help">
<meta name="settings" content="no_pre,use_css,expand_tabs">
<link rel="stylesheet" href="style.css" type="text/css" />

<script src="jquery.min.js" type="text/javascript"></script>
<script src="mark-current-page.js" type="text/javascript"></script>
</head>

<body>

<header>

<div class="header">
  <a href="http://vim-jp.org/">vim-jp</a>
  / <a href="http://vim-jp.org/vimdoc-en/">vimdoc-en</a>
  / usr_09<br />
  <a name="top"></a><h1>usr_09 - Vim Documentation</h1>
  <a href="index.html">Return to main</a>

  <span class="EnglishJapaneseLink">
    <span class="CurrentLanguage">English</span>
  </span>
</div>
</header>

<nav>
<dl>

<dt>BASIC</dt>
<dd><ul>
<li><a href="quickref.html">quickref</a></li>
<li><a href="sponsor.html">sponsor</a></li>
</ul></dd>

<dt>USER MANUAL</dt>
<dd><ul>
<li><a href="usr_toc.html">usr_toc</a></li>
</ul></dd>

<dt>Getting Started</dt>
<dd><ul>
<li><a href="usr_01.html">usr_01</a></li>
<li><a href="usr_02.html">usr_02</a></li>
<li><a href="usr_03.html">usr_03</a></li>
<li><a href="usr_04.html">usr_04</a></li>
<li><a href="usr_05.html">usr_05</a></li>
<li><a href="usr_06.html">usr_06</a></li>
<li><a href="usr_07.html">usr_07</a></li>
<li><a href="usr_08.html">usr_08</a></li>
<li><a href="usr_09.html">usr_09</a></li>
<li><a href="usr_10.html">usr_10</a></li>
<li><a href="usr_11.html">usr_11</a></li>
<li><a href="usr_12.html">usr_12</a></li>
</ul></dd>

<dt>Editing Effectively</dt>
<dd><ul>
<li><a href="usr_20.html">usr_20</a></li>
<li><a href="usr_21.html">usr_21</a></li>
<li><a href="usr_22.html">usr_22</a></li>
<li><a href="usr_23.html">usr_23</a></li>
<li><a href="usr_24.html">usr_24</a></li>
<li><a href="usr_25.html">usr_25</a></li>
<li><a href="usr_26.html">usr_26</a></li>
<li><a href="usr_27.html">usr_27</a></li>
<li><a href="usr_28.html">usr_28</a></li>
<li><a href="usr_29.html">usr_29</a></li>
<li><a href="usr_30.html">usr_30</a></li>
<li><a href="usr_31.html">usr_31</a></li>
<li><a href="usr_32.html">usr_32</a></li>
</ul></dd>

<dt>Tuning Vim</dt>
<dd><ul>
<li><a href="usr_40.html">usr_40</a></li>
<li><a href="usr_41.html">usr_41</a></li>
<li><a href="usr_42.html">usr_42</a></li>
<li><a href="usr_43.html">usr_43</a></li>
<li><a href="usr_44.html">usr_44</a></li>
<li><a href="usr_45.html">usr_45</a></li>
</ul></dd>

<dt>Making Vim Run</dt>
<dd><ul>
<li><a href="usr_90.html">usr_90</a></li>
</ul></dd>

<dt>General subjects</dt>
<dd><ul>
<li><a href="intro.html">intro</a></li>
<li><a href="index.html">help</a></li>
<li><a href="helphelp.html">helphelp</a></li>
<li><a href="vimindex.html">index</a></li>
<li><a href="tags.html">tags</a></li>
<li><a href="howto.html">howto</a></li>
<li><a href="tips.html">tips</a></li>
<li><a href="message.html">message</a></li>
<li><a href="quotes.html">quotes</a></li>
<li><a href="todo.html">todo</a></li>
<li><a href="debug.html">debug</a></li>
<li><a href="develop.html">develop</a></li>
<li><a href="uganda.html">uganda</a></li>
</ul></dd>

<dt>Basic editing</dt>
<dd><ul>
<li><a href="starting.html">starting</a></li>
<li><a href="editing.html">editing</a></li>
<li><a href="motion.html">motion</a></li>
<li><a href="scroll.html">scroll</a></li>
<li><a href="insert.html">insert</a></li>
<li><a href="change.html">change</a></li>
<li><a href="indent.html">indent</a></li>
<li><a href="undo.html">undo</a></li>
<li><a href="repeat.html">repeat</a></li>
<li><a href="visual.html">visual</a></li>
<li><a href="various.html">various</a></li>
<li><a href="recover.html">recover</a></li>
</ul></dd>

<dt>Advanced editing</dt>
<dd><ul>
<li><a href="cmdline.html">cmdline</a></li>
<li><a href="options.html">options</a></li>
<li><a href="pattern.html">pattern</a></li>
<li><a href="map.html">map</a></li>
<li><a href="tagsrch.html">tagsrch</a></li>
<li><a href="quickfix.html">quickfix</a></li>
<li><a href="windows.html">windows</a></li>
<li><a href="tabpage.html">tabpage</a></li>
<li><a href="syntax.html">syntax</a></li>
<li><a href="spell.html">spell</a></li>
<li><a href="diff.html">diff</a></li>
<li><a href="autocmd.html">autocmd</a></li>
<li><a href="filetype.html">filetype</a></li>
<li><a href="eval.html">eval</a></li>
<li><a href="channel.html">channel</a></li>
<li><a href="fold.html">fold</a></li>
</ul></dd>

<dt>Special issues</dt>
<dd><ul>
<li><a href="print.html">print</a></li>
<li><a href="remote.html">remote</a></li>
<li><a href="term.html">term</a></li>
<li><a href="digraph.html">digraph</a></li>
<li><a href="mbyte.html">mbyte</a></li>
<li><a href="mlang.html">mlang</a></li>
<li><a href="arabic.html">arabic</a></li>
<li><a href="farsi.html">farsi</a></li>
<li><a href="hebrew.html">hebrew</a></li>
<li><a href="russian.html">russian</a></li>
<li><a href="ft_ada.html">ft_ada</a></li>
<li><a href="ft_sql.html">ft_sql</a></li>
<li><a href="hangulin.html">hangulin</a></li>
<li><a href="rileft.html">rileft</a></li>
</ul></dd>

<dt>GUI</dt>
<dd><ul>
<li><a href="gui.html">gui</a></li>
<li><a href="gui_w32.html">gui_w32</a></li>
<li><a href="gui_x11.html">gui_x11</a></li>
</ul></dd>

<dt>Interfaces</dt>
<dd><ul>
<li><a href="if_cscop.html">if_cscop</a></li>
<li><a href="if_lua.html">if_lua</a></li>
<li><a href="if_mzsch.html">if_mzsch</a></li>
<li><a href="if_perl.html">if_perl</a></li>
<li><a href="if_pyth.html">if_pyth</a></li>
<li><a href="if_tcl.html">if_tcl</a></li>
<li><a href="if_ole.html">if_ole</a></li>
<li><a href="if_ruby.html">if_ruby</a></li>
<li><a href="debugger.html">debugger</a></li>
<li><a href="workshop.html">workshop</a></li>
<li><a href="netbeans.html">netbeans</a></li>
<li><a href="sign.html">sign</a></li>
</ul></dd>

<dt>Versions</dt>
<dd><ul>
<li><a href="vi_diff.html">vi_diff</a></li>
<li><a href="version4.html">version4</a></li>
<li><a href="version5.html">version5</a></li>
<li><a href="version6.html">version6</a></li>
<li><a href="version7.html">version7</a></li>
<li><a href="version8.html">version8</a></li>
</ul></dd>

<dt>Remarks about specific systems</dt>
<dd><ul>
<li><a href="os_390.html">os_390</a></li>
<li><a href="os_amiga.html">os_amiga</a></li>
<li><a href="os_beos.html">os_beos</a></li>
<li><a href="os_dos.html">os_dos</a></li>
<li><a href="os_mac.html">os_mac</a></li>
<li><a href="os_mint.html">os_mint</a></li>
<li><a href="os_msdos.html">os_msdos</a></li>
<li><a href="os_os2.html">os_os2</a></li>
<li><a href="os_qnx.html">os_qnx</a></li>
<li><a href="os_risc.html">os_risc</a></li>
<li><a href="os_unix.html">os_unix</a></li>
<li><a href="os_vms.html">os_vms</a></li>
<li><a href="os_win32.html">os_win32</a></li>
</ul></dd>

<dt>Standard plugins</dt>
<dd><ul>
<li><a href="pi_getscript.html">pi_getscript</a></li>
<li><a href="pi_gzip.html">pi_gzip</a></li>
<li><a href="pi_logipat.html">pi_logipat</a></li>
<li><a href="pi_netrw.html">pi_netrw</a></li>
<li><a href="pi_paren.html">pi_paren</a></li>
<li><a href="pi_tar.html">pi_tar</a></li>
<li><a href="pi_vimball.html">pi_vimball</a></li>
<li><a href="pi_zip.html">pi_zip</a></li>
</ul></dd>

<dt>Filetype plugins</dt>
<dd><ul>
<li><a href="pi_spec.html">pi_spec</a></li>
</ul></dd>

<dt>Others</dt>
<dd><ul>
<li><a href="vim_faq.html">vim_faq</a></li>
</ul></dd>

</dl>
</nav>

<article class="Vimdoc VimdocJa">
<div id='vimCodeElement'>
<a class="Constant" href="usr_09.html" name="usr_09.txt">usr_09.txt</a>&nbsp;&nbsp;&nbsp;&nbsp;For&nbsp;<span class="Identifier">Vim version 8.0.</span>&nbsp;&nbsp;Last change: 2006 Apr 24<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VIM USER MANUAL - by Bram Moolenaar<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Using the GUI<br>
<br>
<br>
Vim works in an ordinary terminal.&nbsp;&nbsp;GVim can do the same things and a few<br>
more.&nbsp;&nbsp;The GUI offers menus, a toolbar, scrollbars and other items.&nbsp;&nbsp;This<br>
chapter is about these extra things that the GUI offers.<br>
<br>
<a class="Identifier" href="usr_09.html#09.1">09.1</a>&nbsp;&nbsp;Parts of the GUI<br>
<a class="Identifier" href="usr_09.html#09.2">09.2</a>&nbsp;&nbsp;Using the mouse<br>
<a class="Identifier" href="usr_09.html#09.3">09.3</a>&nbsp;&nbsp;The clipboard<br>
<a class="Identifier" href="usr_09.html#09.4">09.4</a>&nbsp;&nbsp;Select mode<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp; Next chapter:&nbsp;<a class="Identifier" href="usr_10.html">usr_10.txt</a>&nbsp;&nbsp;Making big changes<br>
&nbsp;Previous chapter:&nbsp;<a class="Identifier" href="usr_08.html">usr_08.txt</a>&nbsp;&nbsp;Splitting windows<br>
Table of contents:&nbsp;<a class="Identifier" href="usr_toc.html">usr_toc.txt</a><br>
<br>
<span class="PreProc">==============================================================================</span><br>
<a class="Constant" href="usr_09.html#09.1" name="09.1">09.1</a>&nbsp;&nbsp;Parts of the GUI<br>
<br>
You might have an icon on your desktop that starts gVim.&nbsp;&nbsp;Otherwise, one of<br>
these commands should do it:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gvim file.txt<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vim -g file.txt</div>
<br>
If this doesn't work you don't have a version of Vim with GUI support.&nbsp;&nbsp;You<br>
will have to install one first.<br>
&nbsp;&nbsp; Vim will open a window and display &quot;file.txt&quot; in it.&nbsp;&nbsp;What the window looks<br>
like depends on the version of Vim.&nbsp;&nbsp;It should resemble the following picture<br>
(for as far as this can be shown in ASCII!).<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+----------------------------------------------------+<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| file.txt + (~/dir) - VIM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X |&nbsp;&nbsp;&lt;- window title<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+----------------------------------------------------+<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| File&nbsp;&nbsp;Edit&nbsp;&nbsp;Tools&nbsp;&nbsp;Syntax&nbsp;&nbsp;Buffers&nbsp;&nbsp;Window&nbsp;&nbsp;Help&nbsp;&nbsp; |&nbsp;&nbsp;&lt;- menubar<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+----------------------------------------------------+<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| aaa&nbsp;&nbsp;bbb&nbsp;&nbsp;ccc&nbsp;&nbsp;ddd&nbsp;&nbsp;eee&nbsp;&nbsp;fff&nbsp;&nbsp;ggg&nbsp;&nbsp;hhh&nbsp;&nbsp;iii&nbsp;&nbsp;jjj&nbsp;&nbsp;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nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| # |<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| V |<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+----------------------------------------------------+<br>
<br>
The largest space is occupied by the file text.&nbsp;&nbsp;This shows the file in the<br>
same way as in a terminal.&nbsp;&nbsp;With some different colors and another font<br>
perhaps.<br>
<br>
<br>
THE WINDOW TITLE<br>
<br>
At the very top is the window title.&nbsp;&nbsp;This is drawn by your window system.<br>
Vim will set the title to show the name of the current file.&nbsp;&nbsp;First comes the<br>
name of the file.&nbsp;&nbsp;Then some special characters and the directory of the file<br>
in parens.&nbsp;&nbsp;These special character can be present:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The file cannot be modified (e.g., a help file)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The file contains changes<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The file is read-only<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The file is read-only, contains changes anyway<br>
<br>
If nothing is shown you have an ordinary, unchanged file.<br>
<br>
<br>
THE MENUBAR<br>
<br>
You know how menus work, right?&nbsp;&nbsp;Vim has the usual items, plus a few more.<br>
Browse them to get an idea of what you can use them for.&nbsp;&nbsp;A relevant submenu<br>
is Edit/Global Settings.&nbsp;&nbsp;You will find these entries:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Toggle Toolbar&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;make the toolbar appear/disappear<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Toggle Bottom Scrollbar make a scrollbar appear/disappear at the bottom<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Toggle Left Scrollbar&nbsp;&nbsp; make a scrollbar appear/disappear at the left<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Toggle Right Scrollbar&nbsp;&nbsp;make a scrollbar appear/disappear at the right<br>
<br>
On most systems you can tear-off the menus.&nbsp;&nbsp;Select the top item of the menu,<br>
the one that looks like a dashed line.&nbsp;&nbsp;You will get a separate window with<br>
the items of the menu.&nbsp;&nbsp;It will hang around until you close the window.<br>
<br>
<br>
THE TOOLBAR<br>
<br>
This contains icons for the most often used actions.&nbsp;&nbsp;Hopefully the icons are<br>
self-explanatory.&nbsp;&nbsp;There are tooltips to get an extra hint (move the mouse<br>
pointer to the icon without clicking and don't move it for a second).<br>
<br>
The &quot;Edit/Global Settings/Toggle Toolbar&quot; menu item can be used to make the<br>
toolbar disappear.&nbsp;&nbsp;If you never want a toolbar, use this command in your<br>
vimrc file:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:set guioptions-=T</div>
<br>
This removes the 'T' flag from the&nbsp;<a class="Type" href="options.html#'guioptions'">'guioptions'</a>&nbsp;option.&nbsp;&nbsp;Other parts of the<br>
GUI can also be enabled or disabled with this option.&nbsp;&nbsp;See the help for it.<br>
<br>
<br>
THE SCROLLBARS<br>
<br>
By default there is one scrollbar on the right.&nbsp;&nbsp;It does the obvious thing.<br>
When you split the window, each window will get its own scrollbar.<br>
&nbsp;&nbsp; You can make a horizontal scrollbar appear with the menu item<br>
Edit/Global Settings/Toggle Bottom Scrollbar.&nbsp;&nbsp;This is useful in diff mode, or<br>
when the&nbsp;<a class="Type" href="options.html#'wrap'">'wrap'</a>&nbsp;option has been reset (more about that later).<br>
<br>
When there are vertically split windows, only the windows on the right side<br>
will have a scrollbar.&nbsp;&nbsp;However, when you move the cursor to a window on the<br>
left, it will be this one the that scrollbar controls.&nbsp;&nbsp;This takes a bit of<br>
time to get used to.<br>
&nbsp;&nbsp; When you work with vertically split windows, consider adding a scrollbar on<br>
the left.&nbsp;&nbsp;This can be done with a menu item, or with the&nbsp;<a class="Type" href="options.html#'guioptions'">'guioptions'</a>&nbsp;option:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:set guioptions+=l</div>
<br>
This adds the 'l' flag to&nbsp;<a class="Type" href="options.html#'guioptions'">'guioptions'</a>.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
<a class="Constant" href="usr_09.html#09.2" name="09.2">09.2</a>&nbsp;&nbsp;Using the mouse<br>
<br>
Standards are wonderful.&nbsp;&nbsp;In Microsoft Windows, you can use the mouse to<br>
select text in a standard manner.&nbsp;&nbsp;The X Window system also has a standard<br>
system for using the mouse.&nbsp;&nbsp;Unfortunately, these two standards are not the<br>
same.<br>
&nbsp;&nbsp; Fortunately, you can customize Vim.&nbsp;&nbsp;You can make the behavior of the mouse<br>
work like an X Window system mouse or a Microsoft Windows mouse.&nbsp;&nbsp;The following<br>
command makes the mouse behave like an X Window mouse:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:behave xterm</div>
<br>
The following command makes the mouse work like a Microsoft Windows mouse:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:behave mswin</div>
<br>
The default behavior of the mouse on UNIX systems is xterm.&nbsp;&nbsp;The default<br>
behavior on a Microsoft Windows system is selected during the installation<br>
process.&nbsp;&nbsp;For details about what the two behaviors are, see&nbsp;<a class="Identifier" href="gui.html#:behave">:behave</a>.&nbsp;&nbsp;Here<br>
follows a summary.<br>
<br>
<br>
XTERM MOUSE BEHAVIOR<br>
<br>
Left mouse click&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position the cursor<br>
Left mouse drag&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select text in Visual mode<br>
Middle mouse click&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;paste text from the clipboard<br>
Right mouse click&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extend the selected text until the mouse<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pointer<br>
<br>
<br>
MSWIN MOUSE BEHAVIOR<br>
<br>
Left mouse click&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position the cursor<br>
Left mouse drag&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select text in Select mode (see&nbsp;<a class="Identifier" href="usr_09.html#09.4">09.4</a>)<br>
Left mouse click, with Shift&nbsp;&nbsp;&nbsp;&nbsp;extend the selected text until the mouse<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pointer<br>
Middle mouse click&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;paste text from the clipboard<br>
Right mouse click&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; display a pop-up menu<br>
<br>
<br>
The mouse can be further tuned.&nbsp;&nbsp;Check out these options if you want to change<br>
the way how the mouse works:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'mouse'">'mouse'</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in which mode the mouse is used by Vim<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'mousemodel'">'mousemodel'</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;what effect a mouse click has<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'mousetime'">'mousetime'</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; time between clicks for a double-click<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'mousehide'">'mousehide'</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hide the mouse while typing<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'selectmode'">'selectmode'</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;whether the mouse starts Visual or Select mode<br>
<br>
<span class="PreProc">==============================================================================</span><br>
<a class="Constant" href="usr_09.html#09.3" name="09.3">09.3</a>&nbsp;&nbsp;The clipboard<br>
<br>
In section&nbsp;<a class="Identifier" href="usr_04.html#04.7">04.7</a>&nbsp;the basic use of the clipboard was explained.&nbsp;&nbsp;There is one<br>
essential thing to explain about X-windows: There are actually two places to<br>
exchange text between programs.&nbsp;&nbsp;MS-Windows doesn't have this.<br>
<br>
In X-Windows there is the &quot;current selection&quot;.&nbsp;&nbsp;This is the text that is<br>
currently highlighted.&nbsp;&nbsp;In Vim this is the Visual area (this assumes you are<br>
using the default option settings).&nbsp;&nbsp;You can paste this selection in another<br>
application without any further action.<br>
&nbsp;&nbsp; For example, in this text select a few words with the mouse.&nbsp;&nbsp;Vim will<br>
switch to Visual mode and highlight the text.&nbsp;&nbsp;Now start another gVim, without<br>
a file name argument, so that it displays an empty window.&nbsp;&nbsp;Click the middle<br>
mouse button.&nbsp;&nbsp;The selected text will be inserted.<br>
<br>
The &quot;current selection&quot; will only remain valid until some other text is<br>
selected.&nbsp;&nbsp;After doing the paste in the other gVim, now select some characters<br>
in that window.&nbsp;&nbsp;You will notice that the words that were previously selected<br>
in the other gvim window are displayed differently.&nbsp;&nbsp;This means that it no<br>
longer is the current selection.<br>
<br>
You don't need to select text with the mouse, using the keyboard commands for<br>
Visual mode works just as well.<br>
<br>
<br>
THE REAL CLIPBOARD<br>
<br>
Now for the other place with which text can be exchanged.&nbsp;&nbsp;We call this the<br>
&quot;real clipboard&quot;, to avoid confusion.&nbsp;&nbsp;Often both the &quot;current selection&quot; and<br>
the &quot;real clipboard&quot; are called clipboard, you'll have to get used to that.<br>
&nbsp;&nbsp; To put text on the real clipboard, select a few different words in one of<br>
the gVims you have running.&nbsp;&nbsp;Then use the Edit/Copy menu entry.&nbsp;&nbsp;Now the text<br>
has been copied to the real clipboard.&nbsp;&nbsp;You can't see this, unless you have<br>
some application that shows the clipboard contents (e.g., KDE's klipper).<br>
&nbsp;&nbsp; Now select the other gVim, position the cursor somewhere and use the<br>
Edit/Paste menu.&nbsp;&nbsp;You will see the text from the real clipboard is inserted.<br>
<br>
<br>
USING BOTH<br>
<br>
This use of both the &quot;current selection&quot; and the &quot;real clipboard&quot; might sound<br>
a bit confusing.&nbsp;&nbsp;But it is very useful.&nbsp;&nbsp;Let's show this with an example.<br>
Use one gvim with a text file and perform these actions:<br>
<br>
-&nbsp;&nbsp;Select two words in Visual mode.<br>
-&nbsp;&nbsp;Use the Edit/Copy menu to get these words onto the clipboard.<br>
-&nbsp;&nbsp;Select one other word in Visual mode.<br>
-&nbsp;&nbsp;Use the Edit/Paste menu item.&nbsp;&nbsp;What will happen is that the single selected<br>
&nbsp;&nbsp; word is replaced with the two words from the clipboard.<br>
-&nbsp;&nbsp;Move the mouse pointer somewhere else and click the middle button.&nbsp;&nbsp;You<br>
&nbsp;&nbsp; will see that the word you just overwrote with the clipboard is inserted<br>
&nbsp;&nbsp; here.<br>
<br>
If you use the &quot;current selection&quot; and the &quot;real clipboard&quot; with care, you can<br>
do a lot of useful editing with them.<br>
<br>
<br>
USING THE KEYBOARD<br>
<br>
If you don't like using the mouse, you can access the current selection and<br>
the real clipboard with two registers.&nbsp;&nbsp;The &quot;* register is for the current<br>
selection.<br>
&nbsp;&nbsp; To make text become the current selection, use Visual mode.&nbsp;&nbsp;For example,<br>
to select a whole line just press &quot;V&quot;.<br>
&nbsp;&nbsp; To insert the current selection before the cursor:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;*P</div>
<br>
Notice the uppercase &quot;P&quot;.&nbsp;&nbsp;The lowercase &quot;p&quot; puts the text after the cursor.<br>
<br>
The &quot;+ register is used for the real clipboard.&nbsp;&nbsp;For example, to copy the text<br>
from the cursor position until the end of the line to the clipboard:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;+y$</div>
<br>
Remember, &quot;y&quot; is yank, which is Vim's copy command.<br>
&nbsp;&nbsp; To insert the contents of the real clipboard before the cursor:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;+P</div>
<br>
It's the same as for the current selection, but uses the plus (+) register<br>
instead of the star (*) register.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
<a class="Constant" href="usr_09.html#09.4" name="09.4">09.4</a>&nbsp;&nbsp;Select mode<br>
<br>
And now something that is used more often on MS-Windows than on X-Windows.<br>
But both can do it.&nbsp;&nbsp;You already know about Visual mode.&nbsp;&nbsp;Select mode is like<br>
Visual mode, because it is also used to select text.&nbsp;&nbsp;But there is an obvious<br>
difference: When typing text, the selected text is deleted and the typed text<br>
replaces it.<br>
<br>
To start working with Select mode, you must first enable it (for MS-Windows<br>
it is probably already enabled, but you can do this anyway):<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:set selectmode+=mouse</div>
<br>
Now use the mouse to select some text.&nbsp;&nbsp;It is highlighted like in Visual mode.<br>
Now press a letter.&nbsp;&nbsp;The selected text is deleted, and the single letter<br>
replaces it.&nbsp;&nbsp;You are in Insert mode now, thus you can continue typing.<br>
<br>
Since typing normal text causes the selected text to be deleted, you can not<br>
use the normal movement commands &quot;hjkl&quot;, &quot;w&quot;, etc.&nbsp;&nbsp;Instead, use the shifted<br>
function keys.&nbsp;&nbsp;<span class="Special">&lt;S-Left&gt;</span>&nbsp;(shifted cursor left key) moves the cursor left.&nbsp;&nbsp;The<br>
selected text is changed like in Visual mode.&nbsp;&nbsp;The other shifted cursor keys<br>
do what you expect.&nbsp;&nbsp;<span class="Special">&lt;S-End&gt;</span>&nbsp;and&nbsp;<span class="Special">&lt;S-Home&gt;</span>&nbsp;also work.<br>
<br>
You can tune the way Select mode works with the&nbsp;<a class="Type" href="options.html#'selectmode'">'selectmode'</a>&nbsp;option.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
<br>
Next chapter:&nbsp;<a class="Identifier" href="usr_10.html">usr_10.txt</a>&nbsp;&nbsp;Making big changes<br>
<br>
Copyright: see&nbsp;<a class="Identifier" href="usr_01.html#manual-copyright">manual-copyright</a>&nbsp;&nbsp;vim:tw=78:ts=8:ft=help:norl:<br>
</div>

</article>

<footer>
<a href="#top">Return to the top</a> - <a href="index.html">Return to main</a>
<span class="EnglishJapaneseLink">
  <span class="CurrentLanguage">English</span>
</span>
<br />
<div style="text-align:right;">
Hosted by <a href="https://github.com/vim-jp/vimdoc-en">vimdoc-en project</a><br />
If you met any problem, please report it to <a href="https://github.com/vim-jp/vimdoc-en/issues">issue</a>.<br />
</div>
</footer>

<!--<script src="js/check-referrer.js" type="text/javascript"></script>-->

</body>
</html>
<!-- vim:set ts=8 sts=2 sw=2 tw=0 et: -->
